﻿using Basic.FormRemoteModel.PhyFormInter;
using Basic.FormRemoteModel.PhyFormInter.Model;
using Basic.OAService.Interface;
using WeDonekRpc.Client.Interface;

namespace Basic.OAService.RpcEvent
{
    internal class PhyFormInterEvent : IRpcApiService
    {
        private readonly IFormInterService _Service;

        public PhyFormInterEvent ( IFormInterService service )
        {
            this._Service = service;
        }

        public PhyFormTable[] GetPhyTableBody ( GetPhyTableBody obj )
        {
            return this._Service.GetTables(obj.TableName);
        }

        public PhyFormValue GetPhyTableValue ( GetPhyTableValue obj )
        {
            return this._Service.GetValue(obj.Arg);
        }

        public PhyFormColValue[] GetPhyTableValues ( GetPhyTableValues obj )
        {
            return this._Service.GetValues(obj.Arg);
        }
    }
}
